import request from '@/utils/request'

export function databases() {
  return request({
    url: 'api/source/rule/table/view/databases',
    method: 'get'
  })
}

export function sources() {
  return request({
    url: 'api/source/rule/table/view/sources',
    method: 'get'
  })
}

export function tables(database) {
  return request({
    url: 'api/source/rule/table/view/tables/' + database,
    method: 'get'
  })
}

export default {databases, sources, tables}
